﻿using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;

[TestClass]
public class CollectionJoinTest
{
    [TestMethod]
    public void JoinEmptyCollectionTest()
    {
        List<int> l = new List<int>();
        string expected = "[]";
        string actual = l.Join();
        Assert.AreEqual(expected, actual);
    }

    [TestMethod]
    public void JoinOneElementCollectionTest()
    {
        List<int> l = new List<int>();
        l.Add(1);
        string expected = "[1]";
        string actual = l.Join();
        Assert.AreEqual(expected, actual);
    }

    [TestMethod]
    public void JoinFullCollectionTest()
    {
        List<int> l = new List<int>(new int[5] { 1, 2, 3, 4, 5 });
        string expected = "[1,2,3,4,5]";
        string actual = l.Join();
        Assert.AreEqual(expected, actual);
    }
}
